package com.hoshiicloud.commissioncalculation.feign;

import com.hoshiicloud.commissioncalculation.feign.hystrix.HystrixGoodsFeignFallback;
import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.goods.entity.sku.ExtSku;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author ygd
 * @title: GoodsFeignService
 * @projectName hoshiicloud
 * @description: 商品服务feignClient
 * @date 2019/9/5
 */
@FeignClient(name = "hoshiicloud-goods", fallback = HystrixGoodsFeignFallback.class)
public interface GoodsFeignService {

    /**
     * 根据id查询扩展sku
     *
     * @param id 扩展sku
     * @return Response<ExtSku>
     */
    @RequestMapping(value = "/goods/ext-sku/{id}", method = RequestMethod.GET)
    Response<ExtSku> getSkuById(@PathVariable("id") Long id);
}
